﻿using MiniJob.Orleans;

namespace MiniJob.Service;

public interface IScheduleTaskManager
{
    Task StartAsync();
}

public class ScheduleTaskManager(IGrainFactory grainFactory) : IScheduleTaskManager
{
    public async Task StartAsync()
    {
        await ScheduleNormalJob();
    }

    private async Task ScheduleNormalJob()
    {
        await grainFactory.GetGrain<IScheduleGrain>(0).StartAsync();
    }
}
